// 文章列表相关请求模块
import request from '@/utils/request'
// 获取文章
export const getArticle = params => request({
  method: 'GET',
  url: '/v1_0/articles',
  params
})
export const getArticleInfo = articleID => request({
  method: 'GET',
  url: `/v1_0/articles/${articleID}`
})
// 点赞文章 传文章ID
export const addLike = target => request({
  method: 'POST',
  url: '/v1_0/article/likings',
  data: {
    target
  }
})
// 取消点赞文章 传文章ID
export const deleteLike = target => request({
  method: 'DELETE',
  url: `/v1_0/article/likings/${target}`
})
